﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Kaskelot.Web.UserControls.FormControls
{
    public partial class Personnummer : FormControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            iText.Name = iText.ClientID;
            iText.Attributes.Add("data-id", Falt.Id.ToString());

            if (Falt.Required)
                iText.Attributes["class"] += " required";

            if (!string.IsNullOrEmpty(Falt.Default))
                iText.Value = Falt.Default;
        }
    }
}